<div class="content">
	<div class="breadLine">
		<ul class="breadcrumb">
			<li><a href="">Quản trị</a> <span class="divider">&gt;</span></li>
			<li class="active">Sửa ảnh slider</li>
		</ul>
	</div>
	<div class="workplace">
		<div class="row-fluid">
			<div class="span12">
				<div class="head">
					<div class="isw-documents"></div>
					<h1>Thêm ảnh slider</h1>
					<div class="clear"></div>
				</div>
				<form accept-charset="utf-8" method="post" action="<?php echo base_url()."admin/anh-slide/them.html";?>" id="">
					<div class="block-fluid">
						
						<script type="text/javascript">

function BrowseServer( startupPath, functionData )
{
	// You can use the "CKFinder" class to render CKFinder in a page:
	var finder = new CKFinder();

	// The path for the installation of CKFinder (default = "/ckfinder/").
	finder.basePath = '../';

	//Startup path in a form: "Type:/path/to/directory/"
	finder.startupPath = startupPath;

	// Name of a function which is called when a file is selected in CKFinder.
	finder.selectActionFunction = SetFileField;

	// Additional data to be passed to the selectActionFunction in a second argument.
	// We'll use this feature to pass the Id of a field that will be updated.
	finder.selectActionData = functionData;

	// Name of a function which is called when a thumbnail is selected in CKFinder.
	finder.selectThumbnailActionFunction = ShowThumbnails;

	// Launch CKFinder
	finder.popup();
}

// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl, data )
{
	document.getElementById( data["selectActionData"] ).value = fileUrl;
}

// This is a sample function which is called when a thumbnail is selected in CKFinder.
function ShowThumbnails( fileUrl, data )
{
	// this = CKFinderAPI
	var sFileName = this.getSelectedFile().name;
	document.getElementById( 'thumbnails' ).innerHTML +=
			'<div class="thumb">' +
				'<img src="' + fileUrl + '" />' +
				'<div class="caption">' +
					'<a href="' + data["fileUrl"] + '" target="_blank">' + sFileName + '</a> (' + data["fileSize"] + 'KB)' +
				'</div>' +
			'</div>';

	document.getElementById( 'preview' ).style.display = "";
	// It is not required to return any value.
	// When false is returned, CKFinder will not close automatically.
	return false;
}
	</script>
						
						
						<div class="row-form">
							<div class="span3">Ảnh sản phẩm 1</div>
							<div class="span6">
								<input id="img1" name="img1" type="text" size="60" />
									
							</div>
							<div class="span2">
								<input type="button" class="btn btn-info" value="Browse Server" onclick="BrowseServer( 'Files:/', 'img1' );" />
							</div>
							
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Link ảnh 1</div>
							<div class="span6">
								<?php echo form_error('url1')?>
								<input type="text" placeholder="Link ảnh 1" value=""
									name="url1" id="url1" />
							</div>
							<div class="clear"></div>
						</div>
						
						<div class="row-form">
							<div class="span3">Ảnh sản phẩm 2</div>
							<div class="span6">
								<input id="img2" name="img2" type="text" size="60" />
									
							</div>
							<div class="span2">
								<input type="button" class="btn btn-info" value="Browse Server" onclick="BrowseServer( 'Files:/', 'img2' );" />
							</div>
							
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Link ảnh 2</div>
							<div class="span6">
								<?php echo form_error('url2')?>
								<input type="text" placeholder="Link ảnh 2" value=""
									name="url2" id="url2" />
							</div>
							<div class="clear"></div>
						</div>
						
						<div class="row-form">
							<div class="span3">Ảnh sản phẩm 3</div>
							<div class="span6">
								<input id="img3" name="img3" type="text" size="60" />
									
							</div>
							<div class="span2">
								<input type="button" class="btn btn-info" value="Browse Server" onclick="BrowseServer( 'Files:/', 'img3' );" />
							</div>
							
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Link ảnh 3</div>
							<div class="span6">
								<?php echo form_error('url3')?>
								<input type="text" placeholder="Link ảnh 3" value=""
									name="url3" id="url3" />
							</div>
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Ảnh sản phẩm 4</div>
							<div class="span6">
								<input id="img4" name="img4" type="text" size="60" />
									
							</div>
							<div class="span2">
								<input type="button" class="btn btn-info" value="Browse Server" onclick="BrowseServer( 'Files:/', 'img4' );" />
							</div>
							
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Link ảnh 4</div>
							<div class="span6">
								<?php echo form_error('url4')?>
								<input type="text" placeholder="Link ảnh 4" value=""
									name="url4" id="url4" />
							</div>
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Ảnh sản phẩm 5</div>
							<div class="span6">
								<input id="img5" name="img5" type="text" size="60" />
									
							</div>
							<div class="span2">
								<input type="button" class="btn btn-info" value="Browse Server" onclick="BrowseServer( 'Files:/', 'img5' );" />
							</div>
							
							<div class="clear"></div>
						</div>
						<div class="row-form">
							<div class="span3">Link ảnh 5</div>
							<div class="span6">
								<?php echo form_error('url5')?>
								<input type="text" placeholder="Link ảnh 5" value=""
									name="url5" id="url5" />
							</div>
							<div class="clear"></div>
						</div>
						
						<div class="row-form">
							<div class="span3">Trạng thái:</div>
							<div class="span6">
								<label><input type="radio" name="status" value="0" checked></input>Hiện</label>
								<label><input type="radio" name="status" value="1"></input>Ẩn</label>
							</div>
							<div class="clear"></div>
						</div>

						<div class="row-form">
							<div class="span6">
								<p>
									<button class="btn btn-success" type="submit" id="add">Thêm mới</button>
								</p>
							</div>
							<div class="clear"></div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
